<div class="page-right">
        <form action="<?php echo base_url();?>admin/product/save" method="post" name="adminForm" id="createuser"  enctype="multipart/form-data">
                <table class="form-table">
            	<tr class="form-field form-required">
            		<th scope="row"><label for="user_login">Tên sản phẩm <span class="description"></span></label></th>
            		<td><input name="name" type="text" id="name" value="<?php if(isset($item))echo $item->product_name;?>" aria-required="true" /></td>
            	</tr>
            	<tr class="form-field form-required">
            		<th scope="row"><label for="email">Alias <span class="description"></span></label></th>
            		<td><input name="alias" type="text" id="alias" value="<?php if(isset($item))echo $item->product_alias;?>" /></td>
            	</tr>
                
                <tr class="form-field">
            		<th scope="row"><label for="role">Loại nhu yếu phẩm</label></th>
            		<td>
                    <select name="category" id="category">		
                    	<option  value=''>--- Chọn category ---</option>
                        <?php foreach($category as $items) {?>
                    	<option value="<?php echo $items->category_product_id;?>" <?php if($items->category_product_id== $item->product_category) print("selected='selected'");?>><?php echo $items->category_product_name;?></option>
                    	<?php } ?>
                </select>
            		</td>
            	</tr>
                <tr class="form-field">
            		<th scope="row"><label for="last_name">Số lượng </label></th>
            		<td><input name="quanlity" type="text" id="quanlity" value="<?php if(isset($item))echo $item->product_quanlity;?>" /></td>
            	</tr>
                
            	<tr class="form-field">
            		<th scope="row"><label for="first_name">Giá </label></th>
            		<td><input name="price" type="text" id="price" value="<?php if(isset($item))echo $item->product_price;?>" /></td>
            	</tr>
            	<tr class="form-field">
            		<th scope="row"><label for="last_name">Chiết khấu </label></th>
            		<td><input name="discount" type="text" id="discount" value="<?php if(isset($item))echo $item->product_discount;?>" /></td>
            	</tr>
            	<tr class="form-field">
            		<th scope="row"><label for="url">Đặc tính</label></th>
            		<td><?php echo $this->ckeditor->editor('property',$item->product_property);?><br />
                        <span class="description">Đặc tính của sản phẩm</span>
                    </td>
            	</tr>
            	<tr class="form-field form-required">
            		<th scope="row"><label for="pass1">Bảo quản <span class="description"></span></label></th>
            		<td>
                        <?php echo $this->ckeditor->editor('store',$item->product_store);?><br />
                        <span class="description">Bảo quản sản phẩm</span>
            		</td>
            	</tr>
            	<tr>
            		<th scope="row"><label for="send_password">Sử dụng</label></th>
            		<td><?php echo $this->ckeditor->editor('use',$item->product_use);?><br />
                        <span class="description">Cách sử dụng sản phẩm</span>
                    </td>
            	</tr>
            	
                <tr>
                	<th><label for="description">Chi tiết</label></th>
                	<td><?php echo $this->ckeditor->editor('desciption',$item->product_description);?><br />
                	<span class="description">Mô tả chi tiết sản phẩm (cả hình ảnh)</span></td>
                </tr>
                
                
                <tr class="form-field">
            		<th scope="row"><label for="last_name">Hình ảnh </label></th>
            		<td>
                        <input name="image" type="file" id="" value="" class="image-product" />
                        <input type="hidden" name="himage" value="<?php echo $item->product_image_path;?>"/>
                        <br />
                        <span class="description">Hình chính của sản phẩm (Hiển thị trang chủ)</span>
                        <br />
                        <img src="<?php echo base_url();?>public/upload/products/<?php echo $item->product_image_path;?>" width="400" height="200"/>
                    </td>
            	</tr>
                
                 <tr class="form-field">
            		<th scope="row"><label for="last_name">Hình ảnh 1 </label></th>
            		<td>
                        <input name="image1" type="file" id="" value="" class="image-product" />
                        <input type="hidden" name="himage1" value="<?php echo $item->product_image_path1;?>"/>
                        <br />
                        <img src="<?php echo base_url();?>public/upload/products/<?php echo $item->product_image_path1;?>" width="400" height="200"/>
                    </td>
            	</tr>
                
                 <tr class="form-field">
            		<th scope="row"><label for="last_name">Hình ảnh 2 </label></th>
            		<td>
                        <input name="image2" type="file" id="" value="" class="image-product" />
                        <input type="hidden" name="himage2" value="<?php echo $item->product_image_path2;?>"/>
                        <br />
                        <img src="<?php echo base_url();?>public/upload/products/<?php echo $item->product_image_path2;?>" width="400" height="200"/>
                    </td>
            	</tr>
                
                 <tr class="form-field">
            		<th scope="row"><label for="last_name">Hình ảnh 3</label></th>
            		<td>
                        <input name="image3" type="file" id="" value="" class="image-product" />
                        <input type="hidden" name="himage3" value="<?php echo $item->product_image_path3;?>"/>
                        <br />
                        <img src="<?php echo base_url();?>public/upload/products/<?php echo $item->product_image_path3;?>" width="400" height="200"/>
                    </td>
            	</tr>
                
                 <tr class="form-field">
            		<th scope="row"><label for="last_name">Hình ảnh 4 </label></th>
            		<td>
                        <input name="image4" type="file" id="" value="" class="image-product" />
                        <input type="hidden" name="himage4" value="<?php echo $item->product_image_path4;?>"/>
                        <br />
                        <img src="<?php echo base_url();?>public/upload/products/<?php echo $item->product_image_path4;?>" width="400" height="200"/>
                    </td>
            	</tr>
                
                 <tr class="form-field">
            		<th scope="row"><label for="last_name">Hình ảnh 5</label></th>
            		<td>
                        <input name="image5" type="file" id="" value="" class="image-product" />
                        <input type="hidden" name="himage5" value="<?php echo $item->product_image_path5;?>"/>
                        <br />
                        <img src="<?php echo base_url();?>public/upload/products/<?php echo $item->product_image_path5;?>" width="400" height="200"/>
                    </td>
            	</tr>
                
                <tr>
            		<th scope="row"><label for="send_password">Hiển thị</label></th>
            		<td><label for="send_password"><input type="radio" name="publish" id="publish" value="1" <?php if(isset($item) && $item->product_publish==1)print('checked=checked');?>/> </label>
                        <span>Yes</span> 
                        <label for="send_password"><input type="radio" name="publish" id="publish2" value="0" <?php if(isset($item) && $item->product_publish==0)print('checked=true');?>  /> </label>
                        <span>No</span>
                    </td>
            	</tr>
                <tr class="form-field">
            		<th scope="row"><label for="last_name">Thứ tự </label></th>
            		<td><input name="order" type="text" id="order" value="<?php if(isset($item))echo $item->product_order;?>" />
                        <br />
                        <span class="description">Thứ tự của sản phẩm</span>
                    </td>
            	</tr>
                <input type="hidden" name="id" value="<?php if(isset($item))echo $item->product_id;?>"/>
            	</table>
        <p class="submit"><input type="submit" name="createuser" id="createusersub" class="button-primary" value="Lưu lại "  /></p>
    </form>
</div>